package com.umakr.demo.controller;

import com.umakr.demo.model.Student;
import com.umakr.demo.service.TeacherShowStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by yangliu on 2017/8/23.
 */
@Controller
@RequestMapping("/TeacherShowStudentController")
public class TeacherShowStudentController {
    @Autowired
    TeacherShowStudentService teacherShowStudentService;


    @RequestMapping("/showPage")
    public String showPage(){
        return  "StudentManage/teachershowstudent";
    }

    @RequestMapping("/showStudent")
    @ResponseBody
    public List<Student> showStudent(Long tid){
        List<Student> list = teacherShowStudentService.teacherShowStudent(tid);
        return list;
    }
}
